import {messages} from "share/common";
import React, { Component } from 'react'
import { Tabs } from "antd";
import TemplateContent from "./template-content";
import Template from "components/UI/template"

const { Header, Middle } = Template;

class LoanSetting extends Component {

  state = {
    nowStatus: 'Cash'
  };

  onChangeTabs = key => {
    this.setState({ nowStatus: key })
  };

  render() {
    const { nowStatus } = this.state;
    return (
      <Template>
        <Header>
          <Tabs defaultActiveKey={nowStatus} onChange={this.onChangeTabs}>
            <Tabs.TabPane tab={messages('finance-1.key301')/*借款设置*/} key='Cash'/>
            <Tabs.TabPane tab={messages('finance-1.key297')/*还款设置*/} key='Refund'/>
            <Tabs.TabPane tab={messages('finance-1.key299')/*打印设置*/} key='Print'/>
          </Tabs>
        </Header>
        <Middle>
          <TemplateContent tableKey={nowStatus}/>
        </Middle>
      </Template>
    )
  }
}

export default LoanSetting
